<template>
  <div class="card" @click="goDetail">
    <div style="display: flex">
      <!-- repC(data.title,par)repC(data.content,par) -->
      <div class="tit" v-html="$options.filters.repC(data.title,par)"></div>
      <el-tag size="small" style="margin-left: 20px">{{ data.colName}}</el-tag>
    </div>
    <div class="content" v-html="$options.filters.repC(data.content,par)"></div>
    <div class="bt">创建时间：{{data.startTime}} 结束时间：{{data.endTime}}</div>
    <el-divider></el-divider>
  </div>
</template>

<script>
export default {
  name: "cardItems",
  props:{
    data:{},
    par:''
  },
  methods:{
    goDetail(){
      let {href} = this.$router.resolve({name:'newsSingle',query: { id: this.data.id } })
      window.open(href,'_blank')
    },
  },
}
</script>

<style scoped lang="scss">
.card{
  width:calc(100% - 40px);
  background: #fff;
  border-radius: 3px;
  padding: 30px 20px 20px;
  .tit{
    font-size: 16px;
    font-weight: bold;
    color: #333333;
    line-height: 24px;
    //line-height: 30px;
  }
}

.content{
  :deep img{
    display: none!important;
  }
  line-height: 25px;
  margin-top: 10px;
  min-height: 120px;
}
.bt{
  font-size: 14px;
  color: #999999;
  line-height: 60px;
}
</style>
